package woc.dao.base;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.springframework.orm.hibernate3.HibernateCallback;

public interface RootDAO<T> {
	
	public List<T> loadAll();

	public T save(T entity);

	public void delete(T entity);

	public T get(Serializable id);

	public T load(Serializable id);

	public void saveOrUpdate(T entity);

	public void deleteAll(Collection<T> entities);

	public void saveOrUpdateAll(Collection<T> entities);

	public List<T> find(String hql);

	public void update(T entity);

	public T getByExampleUnique(T entity);

	public List<T> getByExampleList(T entity);

	public List<T> listAll();

	public Object execute(HibernateCallback action);

	public List<T> findByNamedParam(String queryString, String paramName,Object value);

	public List<T> findByNamedParam(String queryString, String[] paramNames,Object[] values);
}
